package com.epam.Aquarium;

import com.epam.Reptile.Frog;
import com.epam.Reptile.Reptile;
import com.epam.Reptile.Tortoise;

import java.util.ArrayList;
import java.util.List;

public class AquariumReptile extends Aquarium {

    public AquariumReptile(){

    }

    public AquariumReptile(double price, AquariumQuality qualityAquarium) {
        super(price, qualityAquarium);
    }

    private List<Reptile> reptiles = new ArrayList<Reptile>();

    public  void addReptile(Reptile reptile){

        reptiles.add(reptile);

        setPrice(getPrice()+ reptile.getPrice());
    }

    public void showReptile(){
        System.out.println("Reptile in aquarium:");
        for (Reptile r : reptiles){
            System.out.println(r.toString());
        }
    }

    @Override
    public String toString() {
        return "Aquarium Reptile [ Price: "+getPrice()+"; Quality: "+ getQuality()+"]";
    }

}
